<?php
require_once(dirname(dirname(__FILE__)) . '/app.php');

$time = $_GET['time'];

$searchDate = $_GET['search_date'];
$getDateArray = array();
if( preg_match("#/#", $searchDate) ){
	$getDateArray = explode("/", $searchDate);
}else if( preg_match("#-#", $searchDate) ){
	$getDateArray = explode("-", $searchDate);
}else{
	array_push($getDateArray, substr($searchDate, 0, 4));
	array_push($getDateArray, substr($searchDate, 4, 2));
	array_push($getDateArray, substr($searchDate, 6, 2));
}


$year = $getDateArray[0] * 1;
$month = $getDateArray[1] * 1;
$day = $getDateArray[2] * 1;

$tmp_date=date("YmdHi");
$tmp_year=substr($tmp_date,0,4) * 1;
$tmp_mon =substr($tmp_date,4,2) * 1;
$tmp_day = substr($tmp_date, 6, 2) * 1;
$tmp_Hour = substr($tmp_date, 8, 2) * 1;
$tmp_Minute = substr($tmp_date, 10, 2) * 1;
$year = $year < 1 ? $tmp_year : $year;
$month = $month < 1 ? $tmp_mon : $month;
$day = $day < 1 ? $tmp_day : $day;

$startTime = mktime(0, 0, 0, $month, $day, $year);
$endTime = mktime(23, 59, 59, $month, $day, $year);
$bookedList = array();
$bookedList = Preengage::GetDelList($startTime, $endTime);


include template('service/booked_del_list');


//include template('service_staff_index');
//include template('subscribe');
